import request from "@/utils/request"
export function gettransportLinePageApi(data) {
  return request({
    url: `/transportLine/page`,
    method: "post",
    data,
  });
}
//添加路线
export function posttransportLineApi(data) {
  return request({
    url: `/transportLine`,
    method: "post",
    data,
  });
}

//获取线路详情
export function gettransportLineApi(id) {
  return request({
    url: `/transportLine/${id}`,
    method: "get",
  });
}

//更新线路
export function puttransportLineApi(data) {
  return request({
    url: `/transportLine/${data.id}`,
    method: "put",
    data,
  });
}

//删除路线
export function deleteLineApi(id) {
  return request({
    url: `/transportLine/${id}`,
    method: "DELETE",
  });
}

//获取成本
export function getcostApi() {
  return request({
    url: `/cost-configuration-manager`,
    method: "get",
  });
}

//获取车次列表
export function gettransportLineTripsApi(params) {
  return request({
    url: `/transportLine/trips`,
    method: "get",
    params,
  });
}

//添加车次
export function posttransportLineTripsApi(data) {
  return request({
    url: `/transportLine/trips`,
    method: "post",
    data,
  });
}

//获取车次详情
export function gettransportLineInfoApi(id) {
  return request({
    url: `/transportLine/trips/${id}`,
    method: "get",
  });
}

//删除车次
export function delttetransportApi(id) {
  return request({
    url: `/transportLine/trips/${id}`,
    method: "DELETE",
  });
}

//获取取件分页数据
export function getPickupPageApi(data) {
  return request({
    url: `/pickup-dispatch-task-manager/page`,
    method: "POST",
    data,
  });
}

//获取运输任务分页数据
export function gettaskManagerPageApi(data) {
  return request({
    url: `/transport-task-manager/page`,
    method: "POST",
    data,
  });
}

//统计运输任务
export function gettaskManagercountApi() {
  return request({
    url: `/transport-task-manager/count`,
    method: "get",
  });
}

//获取车次-车辆绑定关系
export function gettripsTruckDriversApi(params) {
  return request({
    url: `/transportLine/trips/truckDrivers`,
    method: "get",
    params,
  });
}

//手动调整 发车前调整车次 车辆 司机
export function putAdjustApi(data) {
  return request({
    url: `/transport-task-manager/adjust/${data.id}`,
    method: "PUT",
    data,
  });
}

//获取运输任务详情
export function gettaskManagerInfoApi(id) {
  return request({
    url: `/transport-task-manager/${id}`,
    method: "get",
  });
}